import axios from 'axios';

export function getEnsureServicePage(params: any) {
  return axios.get('/mall/ensureservice/page', { params });
}

export function getEnsureServiceList(): Promise<any[]> {
  return axios.get('/mall/ensureservice/list');
}

export function addEnsureService(data: any) {
  return axios.post('/mall/ensureservice', data);
}

export function updateEnsureService(data: any) {
  return axios.put('/mall/ensureservice', data);
}

/**
 *  注意：这里是反单引号`
 */
export function deleteEnsureService(id: string) {
  return axios.delete(`/mall/ensureservice/${id}`);
}
